package com.pangu.store;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

/**
 * 喜好配置相关
 * <p/>
 * Created by cxlin
 */
public class SharedPrefManager {

    // 本地记录的用户的UUID保存标识
    public static final String USER_UUID = "user_uuid";
    // 主配置
    private static final String MOB_CONFIG_PREF = "mob_config_pref";
    // 主配置
    protected SharedPreferences mainPref;

    public SharedPrefManager(Context context) {
        mainPref = context.getSharedPreferences(MOB_CONFIG_PREF, Context.MODE_PRIVATE);
    }

    /**
     * 保存用户的uuid
     *
     * @param result
     */
    public void saveUserUuid(String result) {
        Editor editor = mainPref.edit();
        editor.putString(USER_UUID, result);
        editor.commit();
    }

    /**
     * 获得uuid
     *
     * @return
     */
    public String getUserUuid() {
        return mainPref.getString(USER_UUID, null);
    }
   

}
